import {reqbannerlist} from "../../request/api"
const state={
    list:[]
}

const getters={
    //导出组件
    list(state){
        return state.list
    }
}

const mutations={
    //修改list
    changeList(state,list){
        state.list=list;
    }
}

const actions={
    reqList(context){
        reqbannerlist().then((res)=>{
            if(res.data.code==200){
                // //修改list
                let list =res.data.list?res.data.list:[];
                context.commit("changeList",list)
            }
        })
    }
}

export default {
    state,
    getters,
    mutations,
    actions,
    namespaced: true
}